import axios from '@/libs/request/axios'
// 获取主借人基本信息
export const queryMainBaseInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryMainBaseInfo`,
        params: params,
        method: 'post'
    })
}
// 获取主借人工作信息
export const queryMainWorkInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryMainWorkInfo`,
        params: params,
        method: 'post'
    })
}
// 获取共借人信息
export const queryCommomCustInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryCommomCustInfo`,
        params: params,
        method: 'post'
    })
}
// 获取联系人信息
export const queryContactList = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryContactList`,
        params: params,
        method: 'post'
    })
}

// 获取冗余联系人信息
export const queryContactListOld = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryContactListOld`,
        params: params,
        method: 'post'
    })
}
// 获取地址信息
export const queryAddressList = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryAddressList`,
        params: params,
        method: 'post'
    })
}
// 保存地址信息
export const saveAddress = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveAddress`,
        params: params,
        method: 'post'
    })
}
// 保存联系人信息
export const saveContact = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveContact`,
        params: params,
        method: 'post'
    })
}
// 判断是否有共借人和担保人
export const queryPageArea = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/queryPageArea`,
        params: params,
        method: 'post'
    })
}
// 根据id删除联系人
export const removeContactById = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/removeContactById`,
        params: params,
        method: 'post'
    })
}
// 根据id删除地址信息
export const removeAddressById = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/removeAddressById`,
        params: params,
        method: 'post'
    })
}
// 获取省份接口
export const getAddressList = (params) => {
    return axios.request({
        url: `/case/common/getAddressList`,
        data: params,
        method: 'post'
    })
};
// 更新主借人基本信息
export const saveMainInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveMainInfo`,
        params: params,
        method: 'post'
    })
}
// 更新主借人工作信息
export const saveWorkInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveWorkInfo`,
        params: params,
        method: 'post'
    })
}

// 更新共借人工作信息
export const saveCommonWorkInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveCommonWorkInfo`,
        params: params,
        method: 'post'
    })
}

// 更新担保人工作信息
export const saveGuarantorWorkInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveGuarantorWorkInfo`,
        params: params,
        method: 'post'
    })
}

// 更新共借人基本信息
export const saveCommomCustInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveCommomCustInfo`,
        params: params,
        method: 'post'
    })
}

// 更新担保人基本信息
export const saveGuarantorInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/saveGuarantorInfo`,
        params: params,
        method: 'post'
    })
}

// 征信报告查询客户信息
export const queryCreditCustInfo = (params) => {
    return axios.request({
        url: `/case/caseCustInfo/creditCustInfo`,
        params: params,
        method: 'get'
    })
}
